package com.geekathon.mobzilla.model;

import java.util.Date;

public class BugInfo {

	private int bugId;

	private String assignedTo;

	private Date creationTime;

	private String creator;

	private String status;

	private Date lastChangeTime;

	private int priority;

	private int severity;

	private String component;

	private String product;

	public String getProduct() {
		return product;
	}

	public void setProduct(String product) {
		this.product = product;
	}

	public int getBugId() {
		return bugId;
	}

	public void setBugId(int bugId) {
		this.bugId = bugId;
	}

	public String getAssignedTo() {
		return assignedTo;
	}

	public void setAssignedTo(String assignedTo) {
		this.assignedTo = assignedTo;
	}

	public Date getCreationTime() {
		return creationTime;
	}

	public void setCreationTime(Date creationTime) {
		this.creationTime = creationTime;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getLastChangeTime() {
		return lastChangeTime;
	}

	public void setLastChangeTime(Date lastChangeTime) {
		this.lastChangeTime = lastChangeTime;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	public int getSeverity() {
		return severity;
	}

	public void setSeverity(int severity) {
		this.severity = severity;
	}

	public String getComponent() {
		return component;
	}

	public void setComponent(String component) {
		this.component = component;
	}

	@Override
	public int hashCode() {
		return bugId;
	}

	@Override
	public boolean equals(Object obj) {

		if (obj instanceof BugInfo) {
			return bugId == ((BugInfo) obj).bugId;
		}
		return false;
	}

	/**
	 * 
	 * @return
	 * @author
	 */
	public String toString() {
		StringBuffer buffer = new StringBuffer();
		buffer.append("BugInfo[");
		buffer.append("assignedTo = ").append(assignedTo);
		buffer.append(" bugId = ").append(bugId);
		buffer.append(" component = ").append(component);
		buffer.append(" creationTime = ").append(creationTime);
		buffer.append(" creator = ").append(creator);
		buffer.append(" lastChangeTime = ").append(lastChangeTime);
		buffer.append(" priority = ").append(priority);
		buffer.append(" product = ").append(product);
		buffer.append(" severity = ").append(severity);
		buffer.append(" status = ").append(status);
		buffer.append("]");
		return buffer.toString();
	}
}
